home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 94 / maccd 94.iso / updates / Logitech / LCCInstallDiskWeb.sit / LCCInstallDiskWeb / Logitech Control Center.pkg / Contents / Resources / preflight < prev    next >
Encoding:
Text File  |  2002-06-17  |  973 b   |  28 lines  |  [TEXT/????]

  1. #!/bin/sh
  2.  
  3. # we'll first check if we already have preferences: that means that another version
  4. # is already installed. As this is our first official release, we'll kill any 
  5. # previous pref file, as it's most likely incompatible. To be able to remove the
  6. # prefs file, it's necessary to kill the daemon first
  7.  
  8. LCC_PREF_FILE="/Users/$USER/Library/Preferences/com.Logitech.Control Center Daemon.plist"
  9. NEW_DAEMON="/Library/Application Support/Logitech/LCCDAemon.app"
  10. OLD_DAEMON="/Library/Application Support/Logitech/Logitech Control Center Daemon.app"
  11.  
  12. if [ -e "$LCC_PREF_FILE" ] ; then
  13.  
  14.     # quit the daemon and the config if they are running
  15.     if [ -e "$NEW_DAEMON" ] ; then
  16.         /usr/bin/osascript -e 'Tell application "LCCDaemon" to quit'
  17.     fi
  18.     
  19.     # also quit any pre beta14     
  20.     if [ -e "$OLD_DAEMON" ] ; then
  21.         /usr/bin/osascript -e 'Tell application "Logitech Control Center Daemon" to quit'
  22.     fi
  23.     
  24.     # and finally remove the file for this user
  25.     /bin/rm -f "$LCC_PREF_FILE"
  26.     
  27. fi
  28.